<?php

class connect_DB{

    private $connection;    
    
    function __construct(){    
    }

    function __destruct(){
        $this->connection->close();
    }

    function connect(){

        ini_set('display_errors', 'On');

        $this->connection = new mysqli("mysql.cs.orst.edu", "cs419_group0", "GbzW2346tdrH2rhv", "cs419_group0");
        if ($this->connection->connect_errno) {
            echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
        }
        return $this->connection;

    }

}

?>